home *** CD-ROM | disk | FTP | other *** search
- Path: macromedia.com!news
- From: "Seth M. Livingston" <slivingston@macromedia.com>
- Newsgroups: comp.lang.c++
- Subject: Re: Borland C++ 4.52 problem
- Date: Wed, 13 Mar 1996 09:47:18 -0600
- Organization: Macromedia
- Message-ID: <3146EE06.6F84@macromedia.com>
- References: <4i35jt$8jl@newsbf02.news.aol.com>
- NNTP-Posting-Host: 198.95.246.126
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 2.0 (Win95; I)
-
- PFrank3465 wrote:
- >
- > I'm a novice programmer and I'm trying to write a simple word guessing
- > game... [snip]
-
- At first glance, I'd want to make sure the I was debugging the same
- build that I was executing. I've done that more than once.
-
- At second glance, I'd say the source of your bug is your code. Debuggers
- are nice, but they're no good unless you've really got your Sherlock
- Holmes hat on.
-
- Try the following:
-
- 1. Take a break.
- 2. Describe the exact nature of the bug in English (or appropriate
- language) sentences. For example, "Storage for the secret word
- is being overwritten by data from the guess word," or "the
- pointer to the secret word is pointing to the guess word."
- 3. Recognize that your bug is actually a symptom. Looking for
- symptoms will only get you so far. Look for CAUSES.
- 4. Broaden your horizons. You may have located the symptom, but the
- cause could probably be coming from many different places in
- your code.
- 5. In this specific case, look for incorrect pointers in assignment
- and increment statements. Also, if you are manipulating pointers,
- make sure you restore them to the proper position for the next
- manipulation.
-
- Unfortunately, there aren't many good books (or academic classes) on
- debugging. If anyone has any good suggestions, I'd love to see them.
-
- --
- Seth M. Livingston
- Macromedia FreeHand XDK Support
- slivingston@macromedia.com
-